package com.example.demo.service.impl;

import com.example.demo.mapper.StudentMapper;
import com.example.demo.pojo.*;
import com.example.demo.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentImpl implements StudentService {
    @Autowired
    private StudentMapper studentMapper;
    @Override
    public void save(Student student) {
        studentMapper.save(student);
    }

    @Override
    public Student getByAccount(String account) {
        return studentMapper.getByAccount(account);
    }

    @Override
    public void update(Student student) {
        studentMapper.update(student);
    }

    @Override
    public void touDi(Company_Student companyStudent) {
        studentMapper.touDi(companyStudent);
    }

    @Override
    public List<Company_Student> getByStuAccount(String accountStu) {
        List list = studentMapper.getByStuAccount(accountStu);
        return list;
    }

    @Override
    public List<Student> selectStudentInfo() {
        List<Student> studentInfoList = studentMapper.selectStudentInfo();

        return studentInfoList;
    }

    @Override
    public List<YaoQing> getAccountByAccountStu(String accountStu) {
        return studentMapper.getAccountByAccountStu(accountStu);
    }
}
